<?php

class car_details
{
	var $mode;
	
	var $car;

	function car_details($car, $mode)
	{
		$this->car = $car;
		$this->mode = $mode;
	}
	
	function render()
	{
		if($this->mode == 'Mini')
		{
			$this->renderMini();
		}
		else if($this->mode == 'MiniSolo')
		{
			$this->renderMini(true);
		}
	}
	
	function renderMini($solo=false)
	{
		global $lang, $skin_dir;
		
		if($this->car['c_logo'] == '')
		{
			$logo = '';
		}
		else
		{
			$logo = '<img class="tableImageMid" src="' . $this->car['c_logo'] . '" alt="">';
		}
		$title = $this->car['c_manufacturer'] . ' ' . $this->car['c_model'];
		
		$details = $lang['CarManufacturer'] . ': ' .  $this->car['c_manufacturer'] . '<br>' .  $lang['CarModel'] . ': ' .  $this->car['c_model'] ;
		
		$information = formatOutput($this->car['c_description']);
		if($solo)
		{
			include $skin_dir . 'tpl/tableStart.tpl';
		}
		include $skin_dir . 'tpl/carInfo.tpl';
		if($solo)
		{
			include $skin_dir . 'tpl/tableEnd.tpl';
		}
	}
	

}

?>